﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TallComponents.Web.Pdf.Annotations
{
   /// <summary>
   /// A link annotation.
   /// </summary>
   public class Link
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="Link"/> class.
      /// </summary>
      public Link()
      {

      }

      /// <summary>
      /// Initializes a new instance of the <see cref="Link"/> class.
      /// </summary>
      /// <param name="left">The left position of the link.</param>
      /// <param name="width">The width of the link.</param>
      /// <param name="top">The top position of the link.</param>
      /// <param name="height">The height of the link.</param>
      /// <param name="actionScript">The javascript executed when the link is activated.</param>
      internal Link( double left, double width, double top, double height, string actionScript )
      {
         Left = left;
         Width = width;
         Top = top;
         Height = height;
         Action = actionScript;
      }

      /// <summary>
      /// Gets or sets the position of link's left edge.
      /// </summary>
      /// <value>The left.</value>
      public double Left { get; set; }

      /// <summary>
      /// Gets or sets the width of the link area.
      /// </summary>
      /// <value>The width.</value>
      public double Width { get; set; }

      /// <summary>
      /// Gets or sets the position of link's top edge.
      /// </summary>
      /// <value>The top.</value>
      public double Top { get; set; }

      /// <summary>
      /// Gets or sets the height of link area.
      /// </summary>
      /// <value>The height.</value>
      public double Height { get; set; }

      /// <summary>
      /// Gets or sets the javascript action associated with the annotation.
      /// </summary>
      /// <value>The javascript action.</value>
      public string Action { get; set; }
   }
}
